// src/requests/auth.js
import RequestManager from "@utils/request";

//获取全部乐谱
export function AllMusicPuRequest(){
    return RequestManager.instance.request({
        url:'AllMusicPu/',
        method : 'GET'
    })
}
// 获取某一种乐器的全部乐谱
export function AllMusicPuinstrumentRequest(){
    return RequestManager.instance.request({
        url:`AllMusical/${'guitar'}/`,
        method : 'GET',
    })
}

//获取单个乐谱信息
export  function GetMusicRequest(id){
    return RequestManager.instance.request({
        url:`Musical/MusicScore/${id}/`,
        method : 'GET',
        headers : {
            'Access-Control-Allow-Origin': '*',
            'Access-Control-Allow-Methods': 'GET, POST',
            'Access-Control-Allow-Headers': 'Content-Type',
            'Access-Control-Max-Age': '3600'
        },
    })
}
// 上传乐谱 图片
export function  MusicPuRequest(user_music){
    return RequestManager.instance.request({
        url:'MusicPu/musical/',
        method : 'POST',
        data:user_music
    })
}

// 发布乐谱
export  function MusciaAddRequest(values){
    return RequestManager.instance.request({
        url:'MusicPu/Add/',
        method:'POST',
        data:values
    })
}
//发布评论
export function sendingCommentRequest(values){
    return RequestManager.instance.request({
        url:'sendimg/MusicPu/Comment/',
        method : 'POST',
        data:values
    })
}

//获取评论
export function getCommentRequest(id){
    return RequestManager.instance.request({
        url:`getMusicCommentAll/${id}/`,
        method : 'GET'
    })
}